package com.bjpowernode.validator.pojo;

import lombok.Data;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;
import javax.validation.constraints.PastOrPresent;
import java.time.LocalDateTime;
import java.util.List;

/**
 * ClassName:Department
 * Package:com.bjpowernode.validator.pojo
 * Description: 描述信息
 *
 * @date:2022/3/19 9:58
 * @author:动力节点
 */
@Data
public class Department {
    /**
     * 主键
     */
    @Null
    private Integer id;
    /**
     * 父级 ID
     */
    @NotNull(message = "不能为null")
    private Integer parentId;
    /**
     * 部门名称
     */
    @NotBlank
    private String name;
    /**
     * 成立时间
     */
    @PastOrPresent
    @NotNull
    private LocalDateTime createTime;


    private List<@Valid Employee> employeeList;




}
